<?php
include("functions.php");
CzyZalogowanyInit();
?>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-2">
        <meta http-equiv="refresh" content="300">
        <title>Genialna sprawdzarka ;)</title>
    </head>
    <body bgcolor="#E0E0E0">
        <a href="index.php?page=info.php">Ogloszenia</a> |
        <a href="index.php?page=zadania.php">Zadania</a> |
        <a href="index.php?page=rozwiazania.php">Rozwiazania</a> |
<?php
if(CzyZalogowany()) {
    print("<a href=\"index.php?page=upload.php\">Wysylanie pliku</a> | \n");
    print("<a href=\"index.php?page=list.php\">Status osobisty</a> | \n");
    print("<a href=\"index.php?page=status.php\">Status</a> | \n");
}
?>
        <a href="index.php?page=ranking.php">Ranking</a> |
<?php
if(CzyZalogowany()) {
    print("<a href=\"index.php?page=chpass.php\">Zmiana hasla</a> | ");
    print("<a href=\"logout.php\">Wyloguj ".$_SESSION['user']."</a>\n");
    if(CzyAdmin($_SESSION['user'])) {
        printf(" | <a href=\"index.php?page=admin.php\">Administracja</a>\n");
    }
}
else {
    print("<a href=\"index.php?page=newaccount.php\">Nowe konto</a> | ");
    print("<a href=\"index.php?page=logininterface.php\">Zaloguj sie</a>\n");
}
?>
        <br><br>
        <table border=0 bgcolor="#FFFFFF" width=100%>
            <tr><td valign=top>

<?php
if($page&&urlIsValid($page)) include($page);
else include("info.php");

print("\n");
HtmlFooter();
?>
